//判断日期是否合法 
function isDateValid(obj) {
	var regex = new RegExp(
			"^(?:(?:([0-9]{4}(-|\/)(?:(?:0?[1,3-9]|1[0-2])(-|\/)(?:29|30)|((?:0?[13578]|1[02])(-|\/)31)))|([0-9]{4}(-|\/)(?:0?[1-9]|1[0-2])(-|\/)(?:0?[1-9]|1\\d|2[0-8]))|(((?:(\\d\\d(?:0[48]|[2468][048]|[13579][26]))|(?:0[48]00|[2468][048]00|[13579][26]00))(-|\/)0?2(-|\/)29))))$");
	var dateValue = obj.value;
	if (!regex.test(dateValue)) {
		alert("日期有误！请选择正确的日期格式,如：(2012-02-01)");
		dateValue = "";
		obj.focus();
		return false;
	}
	return true;
}

function closeMsgBox() {
	var msg = document.getElementById("msg");
	msg.parentNode.removeChild(msg);
}